import {createApp, Directive, VueElement} from 'vue'
import ElementPlus from 'element-plus'
import App from './App.vue'
import { router } from './router'
import 'virtual:svg-icons-register'
import 'xe-utils'
import VXETable from 'vxe-table'
import SvgIcon from '@/components/svg-icon'
import 'vxe-table/lib/style.css'

import '@/icons/iconfont/iconfont'
import 'element-plus/dist/index.css'
import '@/styles/index.scss'

// 自定义指令
import * as directive from '@/directive';

const app = createApp(App)

// 加载自定义指令
Object.keys(directive).forEach((key) => {
    app.directive(key, (directive as { [key: string]: Directive })[key]);
});

app.use(router)
app.use(SvgIcon)
app.use(ElementPlus)
app.use(VXETable)
app.mount('#app')
